#include "absolutes.h"

absolutes::absolutes() {
}

//Takes an array of floats and Returns the Biggest Number in the Array
float absolutes::biggestNumber(float* numbers) {
    int numFloats = sizeof(numbers) / sizeof(float);
    float biggestNumber = -1000000;
    for(int i; i < numFloats; i++) {
        if(numbers[i] > biggestNumber) {
            biggestNumber = numbers[i];
        }
    }
    return biggestNumber;
}

//Takes an array of floats and Returns the Smallest Number in the Array
float absolutes::smallestNumber(float* numbers) {
    int numFloats = sizeof(numbers) / sizeof(float);
    float smallestNumber = 1000000;
    for(int i; i < numFloats; i++) {
        if(numbers[i] < smallestNumber) {
            smallestNumber = numbers[i];
        }
    }
    return smallestNumber;
}